-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help wanted] Improvement of Python Type Stubs - Update availaible #8111
Draft
Daraan
wants to merge
13
commits into
carla-simulator:dev
Choose a base branch
from
Daraan:type-hinting-to-dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes. |
Daraan
force-pushed
the
type-hinting-to-dev
branch
2 times, most recently
from
September 6, 2024 17:29
1f0ca19
to
b7df53f
Compare
Daraan
force-pushed
the
type-hinting-to-dev
branch
2 times, most recently
from
September 18, 2024 12:56
77bb709
to
640c076
Compare
Daraan
force-pushed
the
type-hinting-to-dev
branch
from
October 7, 2024 08:04
640c076
to
315c318
Compare
- Refactored command to own pyi file - fixes - formatting & lint rules
small cleanup improvements
squashable
Daraan
force-pushed
the
type-hinting-to-dev
branch
from
October 14, 2024 13:30
315c318
to
4d83a99
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is the continuation of #7787 that added type hints for the carla package.
This PR contains:
carla.Rss*
classescarla.ad
type hints; also they are only included in the rss build. This needs modification of the setup and some cleaningHow can you contribute:
Carla package
You can use ruff and
--exclude *ad/rss,*ad/map
to exclude the SyntaxError from these two files while they are not addressed or the whole ad subpackage.ad subpackage
ad
subpackage.Important
The type stubs for the ad library are only minimally done there are many things missing (top-level functions & attributes), wrong (e.g. overloads) or incomplete. I will not continue the work on the ad subpackage.
On my repo I have a tag with alternative type stubs for ad that can be used to complement the ones in this PR. Those are more complete but lack function signatures and types: https://github.com/Daraan/LunaticAI-Driver-for-CARLA-Simulator/releases/tag/deleted-Alternative-ad-type-stubs
setup.py
not to include rss files into non-rss build (happens when rebuilding without cleaning build dir).If someone has a better idea how to prevent copying of the
source/carla/ad/
if one does a normal build after an rss build please feel to share your ideas. I am not sure how far we can go withMANIFEST.in
files. Or doing a more thorough cleanup before.Currently these files will be removed instead keeping them around.
Further contributions
Feel free to make PRs against my fork https://github.com/Daraan/CARLA-Simulator-Fork-DebianFix/tree/type-hinting-to-dev to the
type-hinting-to-dev
branch.Where has this been tested?
Possible Drawbacks
This change is